Next | Prev | Up | Top | Contents | Index

Separable and General Convolution Filters

A convolution that uses separable filters operates faster than one that uses general filters.

Special facilities are provided for the definition of two-dimensional separable filters. For separable filters, the image is represented as the product of two one-dimensional images, not as a full two-dimensional image.

To specify a two-dimensional separable filter, call glSeparableFilter2DEXT().

The two images are extracted from memory and processed just as if glConvolutionFilter1DEXT() were called separately for each, with the resulting retained images replacing the current 2D separable filter images, except that each scale and bias are applied to each image using the 2D separable scale and bias vectors.

If you're using convolution on a texture image, keep in mind that the result of the convolution must obey the constraint that the dimensions have to be a power of 2. If you use the reduce border convolution mode, the image shrinks by the filter width minus 1, so you may have to take that into account ahead of time.


Next | Prev | Up | Top | Contents | Index